package com.api.openfeign.client;


import com.api.openfeign.config.OpenFeignConfig;
import com.api.openfeign.dto.UserDto;

import com.api.openfeign.factory.UserFallback;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "auth-service",configuration = OpenFeignConfig.class,fallbackFactory = UserFallback.class)
public interface UserClient {
    @RequestMapping("auth/username")
    UserDto username(@RequestParam("username") String username);
    @RequestMapping("auth/userInfo")
    UserDto userId(@RequestParam("user_id") Long user_id);
}
